﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace Ordering.Service.Contract
{
    partial class OrderDetail
    {
        /// <summary>
        /// This property is not mapped but part of the contract implementation. It
        /// will only be available to clients that share the binary contract assembly.
        /// </summary>
        public decimal TotalOrderPrice
        {
            get { return OrderLines.Sum(line => line.Quantity * line.UnitPrice); }
        }
    }
}
